package com.ayoka.parenting.ui.group.topic.detail;

import com.ayoka.parenting.bean.BaseResponse;
import com.ayoka.parenting.bean.CommentBean;
import com.ayoka.parenting.bean.PagerBean;
import com.ayoka.parenting.interf.RequestCallback;
import com.ayoka.parenting.mvp.BasePresenter;
import com.ayoka.parenting.mvp.BaseView;

/**
 * @ProjectName: MVPPlugin.
 * @ClassName: TopicDetailContract.
 * @Description: .
 * @Author: jincp.
 * @CreateDate: 2019/10/10 18:17.
 */
public class TopicDetailContract {

    interface View extends BaseView {
        void configTopicCommentListData(PagerBean<CommentBean> data);

        void onCommentTopicCallback(boolean isSuccess, CommentBean data);

        void onPraiseCommentCallback(boolean isSuccess, int position);
        
        void onCancelPraiseCommentCallback(boolean isSuccess, int position);
        
        void onStarCommentCallback(boolean isSuccess, int position);
        
        void onCancelStarCommentCallback(boolean isSuccess, int position);
    }

    interface Presenter extends BasePresenter<View> {
        void getTopicCommentListData(boolean isShowWaitDialog, String topicId, int pageNo, int pageSize);

        void commentTopic(String replyToUserId, String replyToTopicID, String topicId, String commentContent);

        void praiseComment(String commentId, int position);

        void cancelPraiseComment(String commentId, int position);

        void starComment(String commentId, int position);

        void cancelStarComment(String commentId, int position);
    }

    interface Model {
        void getTopicCommentListData(BasePresenter presenter, String topicId, int pageNo, int pageSize, RequestCallback<PagerBean<CommentBean>> requestCallback);

        void commentTopic(BasePresenter presenter, String replyToUserId, String replyToTopicID, String topicId, String commentContent, RequestCallback<CommentBean> callback);

        void praiseComment(BasePresenter presenter, String commentId, RequestCallback<BaseResponse> requestCallback);

        void cancelPraiseComment(BasePresenter presenter, String commentId, RequestCallback<BaseResponse> requestCallback);

        void starComment(BasePresenter presenter, String commentId, RequestCallback<BaseResponse> requestCallback);

        void cancelStarComment(BasePresenter presenter, String commentId, RequestCallback<BaseResponse> requestCallback);
    }
}
